/*
 * @Author: Sam
 * @Date: 2020-10-12 15:23:33
 * @LastEditTime: 2021-02-19 16:25:47
 * @LastEditors: Connor
 * @Description: 
 * @FilePath: \thework\tofba-client\src\api\user.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/author/getToken',
    method: 'post',
    data
  })
}

//获取客户信息
export function getInfo(data) {
  //console.log('%ctoken: ', 'color: MidnightBlue; background: Aquamarine;', token);
  return request({
    url: '/customer/getInfo',
    method: 'post',
    data,
  })
}
//修改密码
export function updatePassword(data) {
  //console.log('%ctoken: ', 'color: MidnightBlue; background: Aquamarine;', token);
  return request({
    url: '/customer/updatePassword',
    method: 'post',
    data,
  })
}

export function logout(token) {
  return request({
    url: '/author/removeToken',
    method: 'post',
    params: { token }
  })
}
